package com.pacai.varscope;


public class VarScopeDetail {
    public static void main(String[] args) {
        Person person = new Person();
        T t = new T();
        t.test();
        t.test2(person);
    }
}


class T{
    public void test(){
        Person person = new Person();
        System.out.println(person.name);
    }

    public void test2(Person p){
        System.out.println(p.name);
    }
}


class Person{
    public int age = 20;
    String name = "jack";
    public void say(){
        String name = "king";
        System.out.println("say()name = " + name);
    }

    public void hi(){
        String address = "北京";
//        String address = "阿松四大"; 重复定义
        String name = "撒旦";
    }

}